package com.sdhs.system.syncdata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sdhs.system.syncdata.domain.SyncSysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangmy
 * @date 2022/9/2010:46
 * @Description:
 */
@Mapper
public interface SyncSysUserMapper extends BaseMapper<SyncSysUser> {
    //修改用户状态
    int deleteUser(@Param("id") String id);

    int updateUser(SyncSysUser sysUser);

    SyncSysUser getUserById(@Param("id") String id);

    int updateStatus(@Param("id") String id);
    //只返回有角色的用户
     List<String> getRoleUser(@Param("rolePid") String rolePid);

     //查询所有用户信息，只返回id
    List<Integer> getUserIds();

    //取最大用户id
    int getMaxId();

    //设置序列值
    int setUserId();
    //查询序列值
    int getUserId();

    //获取新插入的用户信息
    SyncSysUser getInsertUser(@Param("userName") String userName,@Param("phoneNumber") String phoneNumber,@Param("deptId") Long deptId);

}
